/*
Copyright (c) [2019年5月1日] [吴超]
[MBT_studio] is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
		 http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details.
*/



#pragma once


#include "../../../S_Physics.h"

#include "../A_核心/Bullet核心.h"
#include "../A_核心/Bullet几何.h"






struct S_Bullet车 : public S_车辆 {
	btVehicleRaycaster* m_vehicleRayCaster;
	btRaycastVehicle*	m_vehicle;
	btRigidBody*		m_Body;

	std::vector<void*>	m_车轮对象;
	btVector3*			m_射线;
	



	S_Bullet车(S_Bullet物理引擎核心& core, const S_车体参数& 车体参数, uint32 key = 0);
	~S_Bullet车();



	inline void* f_getBody() { return m_Body; }
	//inline void* f_get关联对象() { return m_Body->userData; }
	inline void		f_冻结(bool no) { ; }

	inline void f_绑定关联对象(void* data) { m_Body->setUserPointer(data); }
	void		f_绑定关联对象(void* data, uint32 id);

	//void f_setLocation(const vec3& loc);
	//void f_setRot(const vec3& loc);
	void f_setLocRot(const vec3& loc, const vec3& r);
	void f_setPos(const vec3& l);
	void f_setRot(const vec3& r);
	void f_setVel(const vec3& l);
	vec3 f_getLocation();


	vec3	f_getLoc();
	vec3	f_getVel();
	vec4	f_get速度();
	vec3	f_getRotVel();


	void f_加速(const float32 s) ;
	void f_倒车(const float32 s) ;
	void f_刹车(const float32 s) ;
	void f_手刹(const float32 s) ;
	void f_转向(const float32 s) ;



};











